/*
                    Checkbox Class Definition
*/

#ifndef CHECKBOX_H
#define CHECKBOX_H

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <string>
#include "../Structs.h"

#include "Label.h"

#include "Widget.h"

using namespace std;

class Checkbox : public Widget
{
      public:
             Checkbox();
             ~Checkbox();

             int Initialise(Point NewPosition, string strFFilepath, int iSize,
                                   string strCFilepath, string strNCFilepath, string strLabelText, SDL_Color NewColor);

             void setChecked(bool bNewChecked);
             bool getChecked();

             void setPosition(Point NewPosition);
             Point getPosition();

             int getWidth();

             int HandleMouseDown(int iMouseX, int iMouseY);

             int BlitToSurface(SDL_Surface *screen);

             int BlitToFrame(SDL_Surface *surface, Point FramePosition);

      protected:
              bool bChecked;
              string strText;

              SDL_Surface *BoxImageUnchecked;
              SDL_Surface *BoxImageChecked;

              Label lblText;

              Point Position;

              int UpdateCheckbox();
              int SwitchChecked();
};

#endif
